home *** CD-ROM | disk | FTP | other *** search
/ Die Speccy' 97 / Die Speccy' 97.iso / amiga_system / the_aminet / util / dir / ro_v110.lha / RO / Install / RO-Install < prev    next >
Text File  |  1995-10-16  |  7KB  |  371 lines

  1. ; $VER: RO-Install 1.10 (16.10.95)
  2. ; Original RO Installer script by Juergen Schubert <juergen@desert.sub.org>
  3. ; Rewritten by Oliver Rummeyer, inspired by MagicCX-Install ⌐1994 Kai Iske.
  4.  
  5. ;========================================================
  6. ; Set Strings
  7.  
  8. (set #nokick
  9. (cat "You must be using Kickstart 2.04 to use RO. Aborting!"
  10. ))
  11.  
  12. (set #nomui
  13. (cat "You need version 2.3 of MUI or better. Aborting!"
  14. ))
  15.  
  16. (set #startmsg
  17. (cat "\n\RO installation script.\n"
  18.      "This script installs RO on your Amiga.\n\n"
  19.      "Read the Documentation files for\n"
  20.      "more information on the distribution.\n"
  21.      "RO ⌐ 1994,1995 Oliver Rummeyer\n"
  22.      "All rights reserved."
  23. ))
  24.  
  25. (set #icons "Which type of icons would you like to install")
  26. (set #magicwbicons "MagicWB-Style Icons; 8 colors")
  27. (set #classicicons "Classic-WB-Style Icons; 4 colors")
  28. (set #noicons "No Icons")
  29.  
  30. (set #install "\n\nInstalling RO to\n\n")
  31. (set #drawer
  32. (cat "In which disk or drawer should RO be installed?\n"
  33.      "(A drawer \"RO\" will be created there)"
  34. ))
  35.  
  36. (set #update
  37. (cat "A drawer \"RO\" already exists in the specified disk "
  38.      "or drawer. You should make a backup of your prefs "
  39.      "file before you continue the installation procedure.\n\n"
  40.      "Should I continue the installation procedure?"
  41. ))
  42.  
  43. (set #lang "Which languages should be installed?")
  44. (set #own
  45. (cat    "\n\nIf you want to create own versions of\n"
  46.     "the catalogs pleaser have a look at the\n"
  47.     "distributions Locale directory. You will\n"
  48.     "find the .ct and .cd files there. If you\n"
  49.     "have created you own translations, please\n"
  50.     "don`t keep it a secret"
  51. ))
  52.  
  53. (set #install-docs "Would you like to install RO's documentation?")
  54. (set #doc "Which documentation formats would you like to install?")
  55. (set #doclang "Which language do you prefer for the documentation?")
  56.  
  57. (set #install-rexx "Would you like to install the arexx examples?")
  58. (set #drawer-rexx "In which disk or drawer should the arexx examples be installed?")
  59.  
  60. (set #exitmsg
  61. (cat "Have fun using RO.\n"
  62.      "Please support the shareware concept!\n\n"
  63.      "If you like RO, please send $20.- or DM 30.- to\n\n"
  64.      "Oliver Rummeyer\n"
  65.      "Hochbergstra▀e 49/1\n"
  66.      "D-88213 Ravensburg\n"
  67.      "Germany/Europe"
  68. ))
  69. ;========================================================
  70.  
  71. (if (< (/ (getversion) 65536) 37)
  72. (
  73.     (abort #nokick)
  74. ))
  75.  
  76. (if (= (exists "LIBS:muimaster.library" (noreq)) 1)
  77. (
  78.     (if (< (/ (getversion "LIBS:muimaster.library") 65536) 10)
  79.     (
  80.         (abort #nomui)
  81.     ))
  82. )
  83. (
  84.     (abort #nomui)
  85. ))
  86.  
  87. ;=========================================================
  88.  
  89. (message #startmsg)
  90.  
  91. (complete 0)
  92.  
  93. ;=========================================================
  94.  
  95. (set IconType
  96.     (askchoice
  97.         (prompt #icons)
  98.         (help @askchoice-help)
  99.         (choices
  100.             #magicwbicons
  101.             #classicicons
  102.             #noicons
  103.         )
  104.         (default 0)
  105.     )
  106. )
  107.  
  108. (complete 15)
  109.  
  110. ;=========================================================
  111.  
  112. (set TargetDir
  113.     (askdir
  114.         (prompt #drawer)
  115.         (default "SYS:Tools")
  116.         (help @askdir-help)
  117.     )
  118. )
  119.  
  120. (set DestDir (tackon TargetDir "RO"))
  121. (set @default-dest DestDir)
  122.  
  123. (if (= (exists DestDir) 2)
  124.    (message #update)
  125. )
  126.  
  127. (complete 30)
  128.  
  129. ;=========================================================
  130.  
  131. (makedir DestDir
  132.     (prompt #install DestDir)
  133. )
  134.  
  135. (if (= IconType 0)
  136. (
  137.        (copyfiles
  138.            (source "")
  139.         (choices "/Icons/8col/RO.info" "/Icons/8col/ROPrefs.info" "/Icons/8col/RO.guide.info" "/Icons/8col/RegForm.info")
  140.            (dest DestDir)
  141.     )
  142.     (copyfiles
  143.         (source "/Icons/8col/Drawer.info")
  144.         (dest TargetDir)
  145.         (newname "RO.info")
  146.     )
  147. ))
  148.  
  149. (if (= IconType 1)
  150. (
  151.        (copyfiles
  152.            (source "")
  153.         (choices "/Icons/4col/RO.info" "/Icons/4col/ROPrefs.info" "/Icons/4col/RO.guide.info" "/Icons/4col/RegForm.info")
  154.            (dest DestDir)
  155.     )
  156.     (copyfiles
  157.         (source "/Icons/4col/Drawer.info")
  158.         (dest TargetDir)
  159.         (newname "RO.info")
  160.     )
  161. ))
  162.  
  163. (copyfiles
  164.     (help @copyfiles-help)
  165.     (source "/Binary/RO,binary")
  166.     (dest DestDir)
  167.     (newname "RO")
  168. )
  169.  
  170. (copyfiles
  171.     (help @copyfiles-help)
  172.     (source "/Binary/ROPrefs,binary")
  173.     (dest DestDir)
  174.     (newname "ROPrefs")
  175. )
  176.  
  177. (if (= (exists "ENV:RO") 0)
  178.     (makedir "ENV:RO")
  179. )
  180. (if (= (exists "ENVARC:RO") 0)
  181.     (makedir "ENVARC:RO")
  182. )
  183.  
  184. (copyfiles
  185.     (help @copyfiles-help)
  186.     (source "/Config/RO.prefs,default")
  187.     (dest "ENVARC:RO/")
  188.     (newname "RO.prefs")
  189. )
  190.  
  191. (copyfiles
  192.     (help @copyfiles-help)
  193.     (source "/Config/RO.prefs,default")
  194.     (dest "ENV:RO/")
  195.     (newname "RO.prefs")
  196. )
  197.  
  198. (complete 45)
  199.  
  200. ;========================================================
  201. ; Install Locale
  202.  
  203. (if (AND (NOT (= (getassign "Locale") "")) (exists "libs:locale.library"))
  204. (
  205.  
  206.     (set Lang
  207.         (askoptions
  208.             (prompt #lang)
  209.             (help @askoptions-help)
  210.             (choices "Deutsch" "Franτais" "Italiano")
  211.             (default 0)
  212.         )
  213.     )
  214.  
  215.     (if (IN Lang 0)
  216.         (copyfiles
  217.             (source "")
  218.             (choices "/Locale/Catalogs/Deutsch/ro.catalog")
  219.             (dest "LOCALE:Catalogs/Deutsch")
  220.         )
  221.     )
  222.  
  223.     (if (IN Lang 1)
  224.         (copyfiles
  225.             (source "")
  226.             (choices "/Locale/Catalogs/Franτais/ro.catalog")
  227.             (dest "LOCALE:Catalogs/Franτais")
  228.         )
  229.     )
  230.  
  231.     (if (IN Lang 2)
  232.         (copyfiles
  233.             (source "")
  234.             (choices "/Locale/Catalogs/Italiano/ro.catalog")
  235.             (dest "LOCALE:Catalogs/Italiano")
  236.         )
  237.     )
  238.  
  239.     (message #own)
  240. ))
  241.  
  242. (complete 60)
  243.  
  244. ;========================================================
  245. ; Install ARexx Scripts
  246.  
  247. (if (askbool (help @askbool-help) (prompt #install-rexx))
  248. (
  249.     (set RexxDir
  250.     (askdir
  251.         (prompt #drawer-rexx)
  252.         (default "REXX:")
  253.         (help @askdir-help)
  254.     ))
  255.  
  256.        (copyfiles
  257.            (source "")
  258.         (choices
  259.             "/ARexx/Action.RO"
  260.             "/ARexx/AddArc.RO"
  261.             "/ARexx/ArcHandler.RO"
  262.             "/ARexx/Iconify.RO"
  263.             "/ARexx/LoadDir.RO"
  264.             "/ARexx/LoadOther.RO"
  265.             "/ARexx/PlayModule.RO"
  266.         )
  267.            (dest RexxDir)
  268.     )
  269.  
  270. ))
  271.  
  272. (complete 75)
  273.  
  274. ;=========================================================
  275. ; Install Documentation
  276.  
  277. (if (askbool (help @askbool-help) (prompt #install-docs))
  278. (
  279.  
  280.     (set doctype
  281.         (askoptions
  282.             (prompt #doc)
  283.             (help @askoptions-help)
  284.             (choices
  285.                 "AmigaGuide « V39"
  286.             )
  287.             (default 1)
  288.         )
  289.     )
  290.  
  291.     (if (<> doctype 0)
  292.     (
  293.  
  294.         (set doclang
  295.             (askchoice
  296.                 (prompt #doclang)
  297.                 (help @askchoice-help)
  298.                 (choices
  299.                     "English"
  300.                     "Deutsch"
  301.                     "Franτais"
  302.                 )
  303.                 (default 0)
  304.             )
  305.         )
  306.     ))
  307.  
  308.     (if (= doctype 1)
  309.     (
  310.  
  311.         (if (= doclang 0)
  312.         (
  313.             (copyfiles
  314.                 (source "/Docs/RO.guide,english")
  315.                 (dest DestDir)
  316.                 (newname "RO.guide")
  317.             )
  318.             (copyfiles
  319.                 (source "/Docs/RegForm,english")
  320.                 (dest DestDir)
  321.                 (newname "RegForm")
  322.             )
  323.         ))
  324.  
  325.         (if (= doclang 1)
  326.         (
  327.             (copyfiles
  328.                 (source "/Docs/RO.guide,deutsch")
  329.                 (dest DestDir)
  330.                 (newname "RO.guide")
  331.             )
  332.             (copyfiles
  333.                 (source "/Docs/RegForm,deutsch")
  334.                 (dest DestDir)
  335.                 (newname "RegForm")
  336.             )
  337.         ))
  338.  
  339.         (if (= doclang 2)
  340.         (
  341.             (copyfiles
  342.                 (source "/Docs/RO.guide,francais")
  343.                 (dest DestDir)
  344.                 (newname "RO.guide")
  345.             )
  346.             (copyfiles
  347.                 (source "/Docs/RegForm,francais")
  348.                 (dest DestDir)
  349.                 (newname "RegForm")
  350.             )
  351.         ))
  352.  
  353.     ))
  354.  
  355.     (if (= doctype 0)
  356.     (
  357.         (delete    (tackon DestDir "RO.guide.info"))
  358.         (delete    (tackon DestDir "RegForm.info"))
  359.     ))
  360.  
  361. )
  362. (
  363.     (delete    (tackon DestDir "RO.guide.info"))
  364.     (delete    (tackon DestDir "RegForm.info"))
  365. ))
  366.  
  367. (complete 100)
  368.  
  369. ;==========================================================
  370. (exit #exitmsg)
  371.